<%@ page language="java" import="java.util.List" pageEncoding="UTF-8"%>
<%@ page import= "com.roadmap.struts.action.ActionConst"%>
<%@page import="com.roadmap.common.RdcResourceBundle"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String user_ssn_id = (String)request.getSession().getAttribute(ActionConst.Aspirant_Id_In_Session);
String user_req_id = (String)request.getParameter(ActionConst.Aspirant_Id_In_Request);
if(user_req_id == null){
	user_req_id = user_ssn_id;
}
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/> 
<link href="res/css/layout.css" rel="stylesheet" type="text/css" media="all" />
<link href="res/css/life.css" rel="stylesheet" type="text/css" media="all" />
<link href="res/css/tasksview.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="dwr/util.js"></script>
<script type="text/javascript" src="dwr/engine.js"></script>
<script type="text/javascript" src="dwr/interface/TaskHandler.js"></script>
<!-- <script type="text/javascript" src="res/js/util.js"></script> -->
<script type="text/javascript" src="res/js/func.js"></script>
<script type="text/javascript" src="res/js/Calendar.js"></script>
<script type="text/javascript" src="res/js/TasksView.js"></script>
<title>任务管理 | <%=RdcResourceBundle.COMPANY_NAME %></title>
</head>

<body onload="init();">
<div id="container">
	<jsp:include page="/admin/myheader.jsp"></jsp:include>
	
	<!-- main body -->
	<div class="mainbody"><div class="manager">
	<jsp:include page="/admin/life/nav_btns.jsp"/>
			
		<!-- middle part: content -->
		<div class="middle-part" style="width:730px;border-right:none;">			
			<div style="float:left;width:220px;height:500px;">
				<div style="float:left;width:100%;height: 100px;">
					<table style="float:right;width:100%;margin-right: 30px;">
						<tr>
							<td align="right" style="width:50px;height:30px;"><a href="task.do?act=create">新建</a></td>
						</tr>
						<tr>
							<td align="right" style="width:50px;height:30px;"><a href="task.do?act=all&uid=<%=user_req_id %>">查看所有</a></td>
						</tr>
					</table>				
				</div>
				
				<div id="task_calendar" style="float:left;margin-top:5px;width:100%;height:240px;"></div>
				
				<div style="float:left;margin-top:5px;width:100%;height:200px;">
					<table>
						<tr><td width="60px">状态筛选</td>
							<td><select id="task_rank_select" class="input-text" onchange="this.style.background = this.options[this.selectedIndex].style.background;
																		this.style.color = this.options[this.selectedIndex].style.color;filterTasks(this.id);this.blur();">
									<option>全部</option>
									<option style="background:yellow;color:black">紧急不重要</option>
									<option style="background:blue;color:white">重要不紧急</option>
									<option style="background:red;color:white">紧急且重要</option>
									<option style="background:green;color:white">不重要不紧急</option> 
							</select></td>
						</tr>
					</table>
				</div>
			</div>
			
			<div id="taskListView" style="float:left;width:auto;"></div>
		
			
	</div>
	
		
	</div>
	
	<div class="clear-div"></div>
	</div>
	
	<jsp:include page="/res/jsp/footer.jsp"></jsp:include>
</div>

<script type="text/javascript">
	var _tasksView = new TasksView("<%=user_req_id%>","taskListView", "task.do?act=view&uid=<%=user_req_id%>&id=");
	var _calendar = new Calendar("task_calendar");
	_calendar.setTasksView(_tasksView);	
	
	function init(){
		
	}
	
	function filterTasks(sid){
		var rank = $(sid).selectedIndex;
		_tasksView.setFilter(rank);
		_tasksView.flush();
	}
	
</script>
</body>

</html>
